package com.maiji.cloud.microservice;

import com.maiji.cloud.entities.shopingmall.CapitalMain;
import com.maiji.cloud.request.shopingmall.DistributeFundReqDto;
import com.maiji.cloud.request.shopingmall.DistributeIntegralReqDto;
import org.springframework.cloud.netflix.feign.FeignClient;
import org.springframework.web.bind.annotation.*;

import java.util.List;

@FeignClient(value = "MAIJICLOUD-SHOPINGMALL")
public interface CapitalMainMService {

    /**
     *  分发减肥基金
     * @param distributeFundReqDto
     * @param maijiToken
     * @return
     */
    @PostMapping("/capitalMain/distributeFundByToken")
    Boolean distributeFundByToken (@RequestBody DistributeFundReqDto distributeFundReqDto, @RequestHeader(name = "maijiToken") String maijiToken);

    /**
     *  分发积分
     * @param distributeIntegralReqDto
     * @param maijiToken
     * @return
     */
    @PostMapping("/capitalMain/distributeIntegralByToken")
    Boolean distributeIntegralByToken (@RequestBody DistributeIntegralReqDto distributeIntegralReqDto, @RequestHeader(name = "maijiToken") String maijiToken);

    /**
     * 创建用户资金账户
     * @param userId
     * @return
     */
    @PostMapping("/capitalMain/createCapitalMain")
    Boolean createCapitalMain (@RequestBody String userId);

    /**
     * 创建用户资金账户
     * @param userIds
     * @return
     */
    @PostMapping("/capitalMain/findAllCapitalMains")
    List<CapitalMain> findAllCapitalMains (@RequestBody List<String> userIds);

}
